	<link href="{{ctx}}/static/datepicker/datepicker.css" rel="stylesheet" type="text/css" />
<script src="{{ctx}}/static/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
	<script>
	$(document).ready(function() {
		$('.datepicker').datepicker();
	});
	</script>
<form id="search-form" class="form-inline" role="form" action="{{queryPath}}" method="get" onsubmit="return initQueryDate();">
	<span style="padding-left:0px;">&nbsp;</span><label>用户名:</label><input type="text" maxlength="100" id="so_fieldName" style="width:100px;"  name="q_LIKE_userName" value="{{userName}}" >
	&nbsp;&nbsp;
		<span style="padding-left:0px;">&nbsp;</span><label>版本:</label><input type="text" maxlength="100"   style="width:100px;"  name="q_LIKE_version" value="{{version}}" >
	&nbsp;&nbsp;
	<label>类别:</label><select class="" id="select" name="q_LIKE_action">
		<option value="" selected>全部</option>
		<option value="Login" selected>登录应用</option>
		<option value="Module" selected>模块操作</option>
		<option value="appDownload" selected>应用下载</option>
	</select>
	<label>平台:</label><select id="platform" name="q_LIKE_platformId">
		<option value="" selected>全部</option>
		<option value="android" selected>android</option>
		<option value="ios" selected>ios</option>
	</select>
	
<label>模块 :</label><select  id="modules" name="q_LIKE_moduleName">
		<option value="" selected>全部</option>
			{{#widgetVOs}}
		<option value="{{identify}}" selected>{{name}}</option>
			{{/widgetVOs}}
	</select>

				&nbsp;&nbsp;	<label>日期从</label>
	<input type="text" id="effectiveTime1"  readonly  style="width:120px"
		class=" datepicker" value="{{beginDate}}"
		data-date-format="yyyy-mm-dd" autoclose="true"/>
				<label>到</label>
	<input type="text" id="effectiveTime2" readonly style="width:120px" 
		class=" datepicker" value="{{endDate}}"
		data-date-format="yyyy-mm-dd" autoclose="true"/>
			<input type="hidden" id="effectiveTime3" name="q_GTE_monitorDate"  value="{{beginDate}}" class="col-md-7 inline-form-control" >
			<input type="hidden" id="effectiveTime4" name="q_LTE_monitorDate"  value="{{endDate}}" class="col-md-7 inline-form-control" >
		
	<!-- <input type="hidden" id="so_fieldName1" name="q_LIKE_moduleName"  value="{{moduleName}}" class="col-md-7 inline-form-control" > -->
	<input type="hidden" id="so_fieldName1" name="q_LIKE_appName"  value="{{appName}}" class="col-md-7 inline-form-control" >
	<input type="hidden" id="so_fieldName1" name="appId"  value="{{appId}}" class="col-md-7 inline-form-control" >
	<div></div>
</br>
<span style="padding-left:300px;">&nbsp;</span>
	 <!--日期处理 结束-->
&nbsp;&nbsp;<button type="submit" class="btn btn-primary" >查找</button>&nbsp;
	<div class="btn-group">
	{{#sortInfo}}
	  <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	    <span class="">排序：{{currentSortEntry.text}}
	    {{^noneSortEntry}}
		    {{#currentSortEntry.asc}}↑{{/currentSortEntry.asc}}
		    {{^currentSortEntry.asc}}↓{{/currentSortEntry.asc}}
	    {{/noneSortEntry}}
	    </span>
	    <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu" role="menu">
	  	{{#sortEntrys}}
	    <li>
	    	<a href="?st_{{name}}={{nextDir}}{{#filterExp}}&{{filterExp}}{{/filterExp}}">
	    	{{text}} 
	    	{{#selected}}
		    	{{#nextAsc}}↑{{/nextAsc}}
		    	{{^nextAsc}}↓{{/nextAsc}}
	    	{{/selected}}
	    	</a>
	    </li>
	    {{/sortEntrys}}
	  </ul>
	{{/sortInfo}}
	</div>
	
		&nbsp;<a class="btn btn-primary" href="javascript:void(0);" onclick="excel();">Excel导出</a>
		<span style="padding-right:0px;">&nbsp;</span>
		<div class="btn-group">
	
	  <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	    <span class="">监控记录
	    
	    </span>
	    <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu" role="menu">
	  	
	    <li>
	    	<a href="{{ctx}}/monitor/show?appId={{appId}}">
	    	每日效能监控
	    	</a>
	    </li>
	      <li>
	    	<a href="{{ctx}}/plot/plot-index/{{appId}}/DAY">
	    	应用下载统计
	    	</a>
	    </li>
	    
	  </ul>
	
	</div>
	
    
	<div class="btn-group" style="display:none;">
	{{#sortInfo}}
	  <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	    <span class="sr-only">排序：{{currentSortEntry.text}}
	    {{^noneSortEntry}}
		    {{#currentSortEntry.asc}}↑{{/currentSortEntry.asc}}
		    {{^currentSortEntry.asc}}↓{{/currentSortEntry.asc}}
	    {{/noneSortEntry}}
	    </span>
	    <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu" role="menu">
	  	{{#sortEntrys}}
	    <li>
	    	<a href="?st_{{name}}={{nextDir}}{{#filterExp}}&{{filterExp}}{{/filterExp}}">
	    	{{text}} 
	    	{{#selected}}
		    	{{#nextAsc}}↑{{/nextAsc}}
		    	{{^nextAsc}}↓{{/nextAsc}}
	    	{{/selected}}
	    	</a>
	    </li>
	    {{/sortEntrys}}
	  </ul>
	{{/sortInfo}}
	</div>
</form>
  <script type="text/javascript">
  
  function initQueryDate()
  {
	  var dateFrom=$("#effectiveTime1").val();
	  var dateTo=$("#effectiveTime2").val();
	  if(dateFrom.length>3)
		  {
	  var from=dateFrom+" 00:00:00";
	  $("#effectiveTime3").val(from);
		  }else
		 {
			  $("#effectiveTime3").val("");  
		}
	  
	  if(dateTo.length>3)
		  {
	  var to=dateTo+" 23:59:59";
	  $("#effectiveTime4").val(to);
		  }
	  else
		 {
			  $("#effectiveTime4").val("");  
		}
	  
	 
	
	  var numDateFrom=0;
	  var numDateTo=0;
	  if(dateFrom.length>5)
	      {
		  dateFrom=dateFrom.substring(0,10)
		  dateFrom=dateFrom+" 00:00:00";
		 var timeFrom=stringToJsTime(dateFrom);
		// alert("从"+timeFrom);
		 numDateFrom=timeFrom.getTime();//毫秒数
		  }
	  
	  if(dateTo.length>5)
	      {
		  dateTo=dateTo.substring(0,10);
		  dateTo=dateTo+" 23:59:59";
		  var timeTo=stringToJsTime(dateTo);
		//  alert("到"+timeTo);
		 numDateTo=timeTo.getTime();//毫秒数
		
	      }
	 
	  if(dateFrom!=""&&dateTo!="")
		  {
		  if(numDateFrom>numDateTo)
			  {
			  alert("开始时间不能大于结束时间");
			  return false;
			  }
		  }
	  
  }
//将字符串转换为js的时间对象，  字符串格式yyyy-MM-dd HH:ss:mm     
  function stringToJsTime(timeString) {    
	    var y = timeString.substring(0,4);    
	    var m = timeString.substring(5,7)-1;    
	    var d = timeString.substring(8,10);    
	    var h = timeString.substring(11,13);    
	    var mm = timeString.substring(14,16);    
	    var ss = timeString.substring(17,19);    
	    var time = new Date(y,m,d,h,mm,ss,0);    
	    return time;    
	}   
  $(function(){
		$('#datefrom').datepicker({
			format: 'yyyy-mm-dd',
			autoclose: true
		});
		$('#dateto').datepicker({
			format: 'yyyy-mm-dd',
			autoclose: true
		});
	 });
	 
  //mustache在js中使用需要加双引号 
   $(document).ready(function() {
	//   alert("{{action}}")
	 $("#isDownLoadlLog").val("false");
     $("#select").val("{{action}}");
     $("#modules").val("{{moduleName}}");
     $("#versions").val("{{version}}");
     $("#platform").val("{{platform}}");

	
   });
   </script>